<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./assets/mui/css/mui.min.css">
    <link rel="stylesheet" href="./assets/fontAwesom/css/font-awesome.min.css">
    <link rel="stylesheet" href="./css/index.css">
    <script src="./assets/mui/js/mui.min.js"></script>
    <script src="./assets/zepto/zepto.min.js"></script>
    <!-- 引入模板渲染引擎工具 -->
    <script src="./assets/artTemplate/template-native.js"></script>
    <script src="./js/category.js"></script>
</head>

<body>
    <header class="mui-bar mui-bar-nav my-header">
        <h1 class="mui-title">淘宝</h1>
    </header>
    <nav class="mui-bar mui-bar-tab footer my-footer">
        <a class="mui-tab-item " href="index.html">
            <span class="mui-icon mui-icon-home"></span>
            <span class="mui-tab-label">首页</span>
        </a>
        <a class="mui-tab-item mui-active" href="category.html">
            <span class="mui-icon mui-icon-bars"></span>
            <span class="mui-tab-label">分类</span>
        </a>
        <a class="mui-tab-item" href="cart.html">
            <span class="mui-icon fa fa-shopping-cart fa-lg"></span>
            <span class="mui-tab-label">购物车</span>
        </a>
        <a class="mui-tab-item" href="person.html">
            <span class="mui-icon mui-icon-person"></span>
            <span class="mui-tab-label">我的淘宝</span>
        </a>
    </nav>
    <div class="mui-content mycontent">
        <div class="content-left">
            <div class="mui-scroll-wrapper">
                <div class="mui-scroll">
                    <div class="category-list" id="categoryList">
                        <!-- 模板引擎数据的坑位1 -->
                    </div>
                </div>
            </div>
        </div>
        <div class="content-right">
            <div class="mui-scroll-wrapper wrapper-right">
                <div class="mui-scroll">
                    <div class="brand-list">
                        <ul id="ul-list">
                            <!--模板引擎数据的坑位 -->
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 模板引擎渲染数据 -->
    <script id="categoryId" type="text/html">
        <% for(var i=0;i<result.length;i++){ %>
             <a   data-id="<%=result[i].id %>" href="#" > <%=result[i].categoryName %> </a> 
        <% } %>     
    </script>

    <script id="ulList" type="text/template">
        <% for(var i=0 ;i<result.length;i++){ %>
            <li>
                <a href="#">
                    <img alt="" src="<%=result[i].brandLogo  %>">
                    <p><%=  result[i].brandName %></p>
                </a>
            </li>
        <% } %>
        <% if( !result.length) { %>
            <div>暂无数据</div>
        <% } %>
    </script>
</body>

</html>